<div class="wide form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'staffs-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'staffCategoryCode'); ?>
		<?php echo $form->dropDownList($model, 'staffCategoryCode', CHtml::listData(
				Staffcategory::model()->findAll(), 'staffCategoryId', 'title'),
				array('prompt' => 'Select a Staff Category')
		); ?>		
		<?php echo $form->error($model,'staffCategoryCode'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'gender'); ?>
		<?php echo $form->dropDownList($model, 'gender',  
              array('1' => 'Male', '2' => 'Female'),
              array('empty' => 'Select a Gender')); ?>		
		<?php echo $form->error($model,'gender'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'jobTitleId'); ?>
		<?php echo $form->dropDownList($model, 'jobTitleId', CHtml::listData(
				Jobtitle::model()->findAll(), 'jobTitleId', 'title'),
				array('prompt' => 'Select a Job Title')
		); ?>		
		<?php echo $form->error($model,'jobTitleId'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'firstName'); ?>
		<?php echo $form->textField($model,'firstName',array('size'=>60,'maxlength'=>75)); ?>
		<?php echo $form->error($model,'firstName'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'lastName'); ?>
		<?php echo $form->textField($model,'lastName',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'lastName'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'middleInitial'); ?>
		<?php echo $form->textField($model,'middleInitial',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'middleInitial'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'dateOfBirth'); ?>
		<?php 
			$this->widget('zii.widgets.jui.CJuiDatePicker', array(
				'model'=>$model,
				'attribute'=>'dateOfBirth',
				'value'=>$model->dateOfBirth,
				'options'=>array(
				'dateFormat'=>'yy-mm-dd',
				'showAnim'=> 'fold',
				'autoSize'=>true,
				'showButtonPanel'=>true,
				'defaultDate'=>$model->dateOfBirth,
				),
			'htmlOptions'=>array(
			'style'=>'width:100px;'
			),
		));
		?>
		<?php //echo $form->textField($model,'dateOfBirth'); ?>
		<?php echo $form->error($model,'dateOfBirth'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'comments'); ?>
		<?php echo $form->textArea($model,'comments',array('size'=>80,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'comments'); ?>
	</div>

	<div class="rowhidden">
		<?php echo $form->labelEx($model,'createdBy'); ?>
		<?php echo $form->textField($model,'createdBy',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'createdBy'); ?>
	</div>

	<div class="rowhidden">
		<?php echo $form->labelEx($model,'createdTime'); ?>
		<?php echo $form->textField($model,'createdTime'); ?>
		<?php echo $form->error($model,'createdTime'); ?>
	</div>

	<div class="rowhidden">
		<?php echo $form->labelEx($model,'updatedBy'); ?>
		<?php echo $form->textField($model,'updatedBy',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'updatedBy'); ?>
	</div>

	<div class="rowhidden">
		<?php echo $form->labelEx($model,'updatedTime'); ?>
		<?php echo $form->textField($model,'updatedTime'); ?>
		<?php echo $form->error($model,'updatedTime'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'hospitalId'); ?>
		<?php echo $form->dropDownList($model, 'hospitalId', CHtml::listData(
				Hospital::model()->findAll(), 'hospitalId', 'title'),
				array('prompt' => 'Select a Hospital')
		); ?>
		<?php echo $form->error($model,'hospitalId'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->